<template>
  <div class="app-container">
    <span>待完成</span>
    <div id="main" style="width: 600px;height:400px;"></div>
  </div>
</template>

<script>
  import echarts from 'echarts'

  export default {
    data() {
      return {
        myChart: null,
        option: {}
      }
    },
    created() {
      // 基于准备好的dom，初始化echarts实例

    },
    methods: {
      createNative() {
        this.myChart = echarts.init(document.getElementById('main'), 'light')

        // 指定图表的配置项和数据
        this.option = {
          title: {
            text: 'ECharts 入门示例'
          },
          tooltip: {},
          legend: {
            data: ['日期']
          },
          xAxis: {
            type: 'category',
            data: ['01', '02', '03', '04', '05', '06', '07','01', '02', '03', '04', '05', '06', '07']
          },
          yAxis: {},
          series: [{
            name: '日期',
            type: 'line',
            data: [5, 0, 36, 10, 10, 20, 20,5, 20, 36, 10, 10, 20, 20]

          }]
        }

        // 使用刚指定的配置项和数据显示图表。
        this.myChart.setOption(this.option)
      }
    }
  }
</script>

<style scoped>

</style>
